libMymath.a:add.o sub.o
	ar -rc $@ $^

add.o:add.cpp
	g++ -c $<

sub.o:sub.cpp
	g++ -c $<

.PHONY:output
output:
	mkdir output
	cp *.h output/
	cp libMymath.a output/
	g++ test.cpp -I./output -L./output -lMymath

.PHONY:clean
clean:
	rm -rf libMymath.a *.o output
